package com.education;

//import org.mybatis.spring.annotation.MapperScan;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Configuration;
import tk.mybatis.spring.annotation.MapperScan;

@SpringBootApplication
@EnableDiscoveryClient
@MapperScan("com.education.user.mapper")
@EnableFeignClients
@Configuration
public class UserApplication {
    public static void main(String[] args) {
        SpringApplication.run(UserApplication.class, args);
    }

    /**
     * 解决文件上传,临件夹被程序自动时文删除问题
     * 文件上传时自定义临时路径
     *
     * @return
     */
    //@Bean
    //MultipartConfigElement multipartConfigElement() {
    //    MultipartConfigFactory factory = new MultipartConfigFactory();
    //    //2.该处就是指定的路径(需要提前创建好目录，否则上传时会抛出异常)
    //    factory.setLocation("/mnt/temp/");
    //    return factory.createMultipartConfig();
    //}

}